Course: CIS-546 DATA VISUALIZATION
Term: Spring/T2
Data: The IMF publishes a range of time series data on IMF lending, exchange rates and other economic and financial indicators.
In this section the workspace will be prepared. This means that first the global environment will be cleaned, and all required packages will be loaded.
rm(list = ls())
## Install packages
#install.packages("tidyverse")
#install.packages("knitr")
#install.packages("rmarkdown")
#install.packages("tinytex")
#install.packages("dplyr")
#install.packages("kableExtra")
library(shiny)
library(shinydashboard)
library(tidyverse)
library(dplyr)
library(readxl)
library(reshape)
library(gganimate)
library(gifski)
library(png)
library(plotly)
library(maps)
## Load data of stocks with headlines and description
setwd("/Users/MaxFranke/Desktop/05_Big Data Analytics/04_Classes/04 SP:Term2/CIS-546 DATA VISUALIZATION/05_TermProject/TermProject/01_Data")
gdp <- read.csv("WEOOct2019all.csv")
weo <- read.csv("WEO_Data.csv")
The datasets show years as different columns and the dimensions are wrong, which means that data wrangling and processing has to be done:
Change the column names from Year by deleting the first character “X”
Select the important columns (e.g. delete the WEO.Country.Code)
Use “melt” to summarise all year columns in one column and use “WEO.Subject.Code”, and “Country” as an ID
Change the summarized values from factor to numeric values
Change the Year column to format “Year”
The dashboard is structured into three areas (channels):
National Account
Trade
People
In the first area, the following variables are included:
In the second area, the following variables are included:
In the third area, the following variables are included:
In the following chapters, the visualization will be produced, which will be implemented into the dashboard with shiny.
The dashboard can be found with the following link:
Interpretation
This graph shows the GDP development, divided by the European Union, Middle East and Central Asia, and the full world. There is a break in the year 2008 / 2009 which can be explained by the financial crises during this time.
Also, this graph is the first entry to the dashboard later on. The user will see an animated graph as an eyecatcher, which shows the differences between these regions over the years.
In the next section, inflation is plotted comparably. This graph will be plotted next to the GDP graph. So, the user can compare the development of Inflation and GDP over the years by animated graphs.
Interpretation
This graph shows that in all three areas the inflation was positive, so no deflation occurred Also, there a concerning the percentage change some differences over the years and between the areas. Between 1990-2000 there are some peaks in the areas Middle East and Central Asia and the world, which can show a relationship between these circumstances.
Interpretation
This graph will be used in the dashboard later on, as followed:
There will be a slider for Country, so the User can select a country and a line will be added to the graph. As a conclusion, the user can customize this graph in his specific way.
Additionally, there will be a table, which represents the last 5 years and the change in GDP for the selected countries.
Interpretation
This graph is the last section for the first channel “National Account” of the dashboard. There will be a filter for “Country” and “Year range”. The user can customize the graph for every country in the dataset and select a year range between 1980 and 2020.
The graph above shows an example without the filters. Here, it can be seen that Germany has a wider range of total investments for the years 1980 - 2020 in comparison to the United States.
Interpretation
These two graphs compare the volume of imports and exports between different countries and year ranges. In the dashboard, there will be filters for selecting specific countries to compare and to adjust the y-axis of years. The pro of selecting a year range with a filter in comparison to do it manually with ggplotly by drawing a square is that both graphs change their y-axis and the graphs are comparable.
In this example, there is a comparison between Germany and the United States. The cliche that Germany is an export champion is poorly not true concerning the last few years!
Interpretation
These two graphs will be added to the dashboard in the way that the User can choose via an action button between the Volume of Goods and Volume of Goods and Services. There is sometimes a slight difference, so more information is provided for the User.
Interpretation
These two plots are part of the analysis concerning Unemployment and Employment. In the dashboard, the user can choose between countries and country groups. Then, in these sections, the user can filter a year range and the country or the country group to compare the developments by country or country group.
Interpretation
This map shows the population of million persons, filled by a red scale. In the dashboard, the user can choose a year, and therefore, he or she has the option to see the world population for each year. Also, there will be a table to see the population by country.